/*!
 * Pikaday
 * Copyright © 2014 David Bushell | BSD & MIT license | https://dbushell.com/
 */

// Variables
// Declare any of these variables before importing this SCSS file to easily override defaults
// Variables are namespaced with the pd (pikaday) prefix

// Colours
$pd-text-color: #333 !default;
$pd-title-color: #333 !default;
$pd-title-bg: #fff !default;
$pd-picker-bg: #fff !default;
$pd-picker-border: #ccc !default;
$pd-picker-border-bottom: #bbb !default;
$pd-picker-shadow: rgba(0, 0, 0, 0.5) !default;
$pd-th-color: #999 !default;
$pd-day-color: #666 !default;
$pd-day-bg: #f5f5f5 !default;
$pd-day-hover-color: #fff !default;
$pd-day-hover-bg: #ff8000 !default;
$pd-day-today-color: #33aaff !default;
$pd-day-selected-color: #fff !default;
$pd-day-selected-bg: #33aaff !default;
$pd-day-selected-shadow: #178fe5 !default;
$pd-day-disabled-color: #999 !default;
$pd-week-color: #999 !default;
$pd-inrange-color: #666 !default;
$pd-inrange-bg: #d5e9f7 !default;
$pd-startrange-color: #fff !default;
$pd-startrange-bg: #6cb31d !default;
$pd-endrange-color: #fff !default;
$pd-endrange-bg: #33aaff !default;

// Font
$pd-font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !default;

.pika-single {
  z-index: 9999;
  display: block;
  position: relative;
  color: $pd-text-color;
  background: $pd-picker-bg;
  border: 1px solid $pd-picker-border;
  border-bottom-color: $pd-picker-border-bottom;
  font-family: $pd-font-family;

  &.is-hidden {
    display: none;
  }

  &.is-bound {
    position: absolute;
    box-shadow: 0 5px 15px -5px $pd-picker-shadow;
  }
}

// clear child float (pika-lendar), using the famous micro clearfix hack
// http://nicolasgallagher.com/micro-clearfix-hack/
.pika-single {
  &:before,
  &:after {
    content: ' ';
    display: table;
  }

  &:after {
    clear: both;
  }
}

.pika-lendar {
  float: left;
  width: 240px;
  margin: 8px;
}

.pika-title {
  position: relative;
  text-align: center;

  select {
    cursor: pointer;
    position: absolute;
    z-index: 9998;
    margin: 0;
    left: 0;
    top: 5px;
    opacity: 0;
  }
}

.pika-label {
  display: inline-block;
  position: relative;
  z-index: 9999;
  overflow: hidden;
  margin: 0;
  padding: 5px 3px;
  font-size: 14px;
  line-height: 20px;
  font-weight: bold;
  color: $pd-title-color;
  background-color: $pd-title-bg;
}

.pika-prev,
.pika-next {
  display: block;
  cursor: pointer;
  position: relative;
  outline: none;
  border: 0;
  padding: 0;
  width: 20px;
  height: 30px;
  text-indent: 20px; // hide text using text-indent trick, using width value (it's enough)
  white-space: nowrap;
  overflow: hidden;
  background-color: transparent;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 75% 75%;
  opacity: 0.5;

  &:hover {
    opacity: 1;
  }

  &.is-disabled {
    cursor: default;
    opacity: 0.2;
  }
}

.pika-prev,
.is-rtl .pika-next {
  float: left;
  background-image: url('');
}

.pika-next,
.is-rtl .pika-prev {
  float: right;
  background-image: url('');
}

.pika-select {
  display: inline-block;
}

.pika-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  border: 0;

  th,
  td {
    width: 14.285714285714286%;
    padding: 0;
  }

  th {
    color: $pd-th-color;
    font-size: 12px;
    line-height: 25px;
    font-weight: bold;
    text-align: center;
  }

  abbr {
    border-bottom: none;
    cursor: help;
  }
}

.pika-button {
  cursor: pointer;
  display: block;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  outline: none;
  border: 0;
  margin: 0;
  width: 100%;
  padding: 5px;
  color: $pd-day-color;
  font-size: 12px;
  line-height: 15px;
  text-align: right;
  background: $pd-day-bg;

  .is-today & {
    color: $pd-day-today-color;
    font-weight: bold;
  }

  .is-selected & {
    color: $pd-day-selected-color;
    font-weight: bold;
    background: $pd-day-selected-bg;
    box-shadow: inset 0 1px 3px $pd-day-selected-shadow;
    border-radius: 3px;
  }

  .is-disabled &,
  .is-outside-current-month & {
    color: $pd-day-disabled-color;
    opacity: 0.3;
  }

  .is-disabled & {
    pointer-events: none;
    cursor: default;
  }

  &:hover {
    color: $pd-day-hover-color;
    background: $pd-day-hover-bg;
    box-shadow: none;
    border-radius: 3px;
  }

  .is-selection-disabled {
    pointer-events: none;
    cursor: default;
  }
}

.pika-week {
  font-size: 11px;
  color: $pd-week-color;
}

.is-inrange .pika-button {
  color: $pd-inrange-color;
  background: $pd-inrange-bg;
}

.is-startrange .pika-button {
  color: $pd-startrange-color;
  background: $pd-startrange-bg;
  box-shadow: none;
  border-radius: 3px;
}

.is-endrange .pika-button {
  color: $pd-endrange-color;
  background: $pd-endrange-bg;
  box-shadow: none;
  border-radius: 3px;
}
